﻿using System.Collections.Generic;
using System.Linq;
using FluentValidation.Results;

namespace CNav.Common
{
    public static class ValidationExtension
    {
        public static IEnumerable<string> ErrorList(this ValidationResult result)
        {
            Argument.IsNotNull("result", result);
            return result.Errors.Select(e => e.ErrorMessage);
        }
    }
}
